package org.gdpu.model;

/**
 * Created by HEWI2 on 1/22/14.
 */
public enum DormitoryState {

    /**
     * 住满
     */
    FULL {
        public int getDormitoryState() {
            return 0;
        }
    },
    /**
     * 空缺
     */
    EMPTY {
        public int getDormitoryState() {
            return 1;
        }
    },
    /**
     * 未住满
     */
    NOT_FULL {
        public int getDormitoryState() {
            return 2;
        }
    };

    public abstract int getDormitoryState();

    @Override
    public String toString() {
        switch (this) {
            case FULL:
                return "住满";
            case EMPTY:
                return "空缺";
            case NOT_FULL:
                return "未住满";
            default:
                return "Error";
        }
    }
}
